﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Routing;

namespace Marta.buchalska.wesele
{
    public class Global : System.Web.HttpApplication
    {

        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            RegisterRoutes(RouteTable.Routes);
        }

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.Ignore("{resource}.axd/{*pathInfo}");
            routes.MapPageRoute("R_Galeria",
     "Galeria/{gallery_name}", "~/Gallery.aspx", false, new RouteValueDictionary { { "gallery_name", "default" } });
            routes.MapPageRoute("R_Onas", "O nas", "~/About.aspx");
            routes.MapPageRoute("R_O_nas", "O_nas", "~/About.aspx");
            routes.MapPageRoute("R_Oferta", "Oferta", "~/OurOffer.aspx");
            routes.MapPageRoute("R_formularz", "Formularz", "~/EntryForm.aspx");
            routes.MapPageRoute("R_kontakt", "Kontakt", "~/Contact.aspx");
        }

        void Application_End(object sender, EventArgs e)
        {
            //  Code that runs on application shutdown

        }

        void Application_Error(object sender, EventArgs e)
        {
            // Code that runs when an unhandled error occurs

        }

        void Session_Start(object sender, EventArgs e)
        {
            // Code that runs when a new session is started

        }

        void Session_End(object sender, EventArgs e)
        {
            // Code that runs when a session ends. 
            // Note: The Session_End event is raised only when the sessionstate mode
            // is set to InProc in the Web.config file. If session mode is set to StateServer 
            // or SQLServer, the event is not raised.

        }

    }
}
